package test.test1.mybatis.serviceimpl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import test.test1.mybatis.dao.PlayerMapper;
import test.test1.mybatis.dao.QuestionMapper;
import test.test1.mybatis.pojo.Question;
import test.test1.mybatis.service.PlayerService;
import test.test1.mybatis.service.QuestionService;

@Service("questionService")
public class QuestionServiceImpl implements QuestionService {
	@Resource
	private QuestionMapper questionDao;
	public QuestionServiceImpl() {
		// TODO Auto-generated constructor stub
	}
	public List<Question> listOpen() {
		// TODO Auto-generated method stub
		return questionDao.selectOpenQuestions();
	}
	public List<Question> search(String key) {
		// TODO Auto-generated method stub
		return questionDao.searchQuestions(key);
	}
	public List<Question> listAll() {
		// TODO Auto-generated method stub
		return questionDao.selectAllQuestion();
	}

}
